package com.czk.model.state.practice;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/8/9 14:39
 */
public class CreateOrder implements OrderState {
    private static CreateOrder createOrder = new CreateOrder();

    @Override
    public void updateState(OrderContext orderContext) {
        System.out.println("完成订单创建");
        // 设置为订单为用户支付中
        orderContext.setCurrentState(OrderProcessing.instance());
    }

    private CreateOrder() {
    }

    public static CreateOrder instance() {
        return createOrder;
    }
}
